<form nz-form #userForm="ngForm" (ngSubmit)="save()">
    <!--<div class="modal-header">-->
    <!--<div class="modal-title">-->
    <!--<span>{{l("Permissions")}}<span *ngIf="userName"> - {{userName}}</span></span>-->
    <!--</div>-->
    <!--</div>-->

    <permission-tree #permissionTree></permission-tree>

    <div class="note note-warning" style="margin-bottom: 0; margin-top: 15px">
        <em>{{l('Note_RefreshPageForPermissionChanges')}}</em>
    </div>

    <div class="modal-footer">
        <button nz-button [disabled]="saving" [nzLoading]="saving"
                type="button" [nzType]="'default'" (click)="resetPermissions()"
                nz-tooltip [nzTitle]="l('ResetPermissionsTooltip')">
            <span>{{l("ResetSpecialPermissions")}}</span>
        </button>
        <button nz-button [disabled]="saving || resettingPermissions"
                type="button" [nzType]="'default'" (click)="close()">{{l("Cancel")}}
        </button>
        <button nz-button [nzType]="'primary'" type="submit" [disabled]="!userForm.form.valid || resettingPermissions">
            <i class="anticon anticon-save"></i>
            <span>{{l("Save")}}</span>
        </button>
    </div>
</form>

